home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
TPWENG
/
PUTDOUB.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
800b
|
36 lines
{$N+}
program PutDoub;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
RecHandle: RecordHandle;
FldHandle: FieldHandle;
Doub: Double;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
Doub := 34567.0;
PX(PXTblOpen(TableName, TblHandle, 0, False));
PX(PXRecBufOpen(TblHandle, RecHandle));
PX(PXFldHandle(TblHandle, 'Numeric Field', FldHandle));
(* Update value with Double value *)
PxErr := PXPutDoub(RecHandle, FldHandle, Doub);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else PX(PXRecUpdate(TblHandle, RecHandle));
PX(PXRecBufClose(RecHandle));
PX(PXTblClose(TblHandle));
PX(PXExit);
end.